package com.novax.ex.activity.open.api.inner;

import com.novax.ex.activity.open.model.query.MallWinnerRecordQuery;
import com.novax.ex.activity.open.model.request.MallWinnerMemoRequest;
import com.novax.ex.activity.open.model.request.MallWinnerStatusRequest;
import com.novax.ex.activity.open.model.response.MallOrderWinnerMemosResponse;
import com.novax.ex.activity.open.model.response.MallWinnerRecordResponse;
import com.novax.ex.common.results.ReturnResult;
import com.novax.ex.common.util.PageUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * Description: 商品获得(中奖记录)
 *
 * @author Deucalion@novax.email
 * @date 2023/2/23 15:54
 */
@Tag(name = "一元购-商品获得情况", description = "商品获得情况")
@FeignClient(url = "${remote.activity-service.endpoint}", name = "MallOrderWinnerInnerApi", contextId = "MallOrderWinnerInnerApi")
public interface MallOrderWinnerInnerApi {
    @Operation(summary = "变更状态", description = "变更状态")
    @Parameters({
            @Parameter(name = "id",description = "id"),
            @Parameter(name = "language",description = "语言"),
            @Parameter(name = "creatorType",description = "管理员类型"),
            @Parameter(name = "adminId",description = "管理员ID"),
            @Parameter(name = "status",description = "状态:1=尚未开始沟通,2=已沟通，正在发放实物,3=已沟通，正在发放USDT,4=发放完成")
    })
    @PostMapping(value = "/v3/private/mall/winner/record/status-change/{id}")
    ReturnResult recordStatusChange(
            @PathVariable Long id,
            @RequestHeader("language") String language,
            @RequestParam("creatorType") Integer creatorType,
            @RequestParam("adminId") Long adminId,
            @RequestParam("status") Integer status);

    @Operation(summary = "备注列表", description = "备注列表")
    @GetMapping("/v3/private/mall/winner/record/memo")
    ReturnResult<List<MallOrderWinnerMemosResponse>> memo(
            @RequestHeader("language") String language,
            @RequestParam("mallOrderWinnerId") Long mallOrderWinnerId);

    @Operation(summary = "修改备注", description = "修改备注")
    @Parameters({
            @Parameter(name = "language",description = "语言")
    })
    @PostMapping(value = "/v3/private/mall/winner/record/memo-change")
    ReturnResult memoChange(
            @RequestHeader("language") String language,
            @RequestBody MallWinnerMemoRequest request);

    @Operation(summary = "货币发放列表", description = "货币发放列表")
    @GetMapping("/v3/private/mall/winner/record/list")
    ReturnResult<PageUtil<MallWinnerRecordResponse>> list(
            @RequestHeader("language") String language,
            @ParameterObject MallWinnerRecordQuery query);

    @Operation(summary = "详情", description = "详情")
    @GetMapping("/v3/private/mall/winner/record/detail/{id}")
    ReturnResult<MallWinnerRecordResponse> detail(
            @PathVariable Long id,
            @RequestHeader("language") String language);

    @Operation(summary = "批量变更状态", description = "批量变更状态")
    @Parameters({
            @Parameter(name = "language",description = "语言")
    })
    @PostMapping(value = "/v3/private/mall/winner/record/batch/status-change")
    ReturnResult batchStatusChange(
            @RequestHeader("language") String language,
            @RequestBody MallWinnerStatusRequest request);
}
